package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysAccountMapper;
import com.ruoyi.system.domain.SysAccount;
import com.ruoyi.system.service.ISysAccountService;

/**
 * 系统账户Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-06
 */
@Service
public class SysAccountServiceImpl implements ISysAccountService 
{
    @Autowired
    private SysAccountMapper sysAccountMapper;

    /**
     * 查询系统账户
     * 
     * @param accId 系统账户主键
     * @return 系统账户
     */
    @Override
    public SysAccount selectSysAccountByAccId(Long accId)
    {
        return sysAccountMapper.selectSysAccountByAccId(accId);
    }

    /**
     * 查询系统账户列表
     * 
     * @param sysAccount 系统账户
     * @return 系统账户
     */
    @Override
    public List<SysAccount> selectSysAccountList(SysAccount sysAccount)
    {
        return sysAccountMapper.selectSysAccountList(sysAccount);
    }

    /**
     * 新增系统账户
     * 
     * @param sysAccount 系统账户
     * @return 结果
     */
    @Override
    public int insertSysAccount(SysAccount sysAccount)
    {
        return sysAccountMapper.insertSysAccount(sysAccount);
    }

    /**
     * 修改系统账户
     * 
     * @param sysAccount 系统账户
     * @return 结果
     */
    @Override
    public int updateSysAccount(SysAccount sysAccount)
    {
        return sysAccountMapper.updateSysAccount(sysAccount);
    }

    /**
     * 批量删除系统账户
     * 
     * @param accIds 需要删除的系统账户主键
     * @return 结果
     */
    @Override
    public int deleteSysAccountByAccIds(Long[] accIds)
    {
        return sysAccountMapper.deleteSysAccountByAccIds(accIds);
    }

    /**
     * 删除系统账户信息
     * 
     * @param accId 系统账户主键
     * @return 结果
     */
    @Override
    public int deleteSysAccountByAccId(Long accId)
    {
        return sysAccountMapper.deleteSysAccountByAccId(accId);
    }
}
